import request from '@/utils/request'
let baseURL = '/portal-server/v1/api/receivable'

/**
 * 获取项目列表下拉
 */
export const getReceivableProjectListApi = (data) => {
	return request({
		url: `${baseURL}/receivableProjectList`,
    method: 'post',
    data
	})
};
/**
 * 获取业态下拉
 */
export const getFormatDropdownApi = () => {
	return request({
		url: `${baseURL}/formatDropdown`,
		method: 'get',
	})
};

/**
 * 获取资产类型下拉
 */
export const getBizModeDropdownApi = (params) => {
	return request({
		url: `${baseURL}/bizModeDropdown`,
		method: 'get',
		params
	})
};
/**
 * 获取合同状态下拉
 */
export const getContractsStatusDropdownApi = () => {
	return request({
		url: `${baseURL}/contractsStatusDropdown`,
		method: 'get',
	})
};
/**
 * 获取楼栋下拉
 */
export const getBuildingDropdownApi = (params) => {
	return request({
		url: `${baseURL}/buildingDropdown`,
    method: 'get',
    params
	})
};
/**
 * 获取费项下拉
 */
export const getChargeTypeDropdownApi = () => {
	return request({
		url: `${baseURL}/chargeTypeDropdown`,
    method: 'get',
	})
};
/**
 * 获取楼层下拉
 */
export const getFloorsDropdownApi = (params) => {
	return request({
		url: `${baseURL}/floorsDropdown`,
    method: 'get',
    params
	})
};
/**
 * 项目级应收明细表
 */
export const getReceivableContractsListApi = (params) => {
	return request({
		url: `${baseURL}/receivableContractsList`,
    method: 'post',
    data: params
	})
};
/**
 * 应收账单明细
 */
export const getReceivableBillListApi = (params) => {
	return request({
		url: `${baseURL}/receivableBillList`,
    method: 'post',
    data: params
	})
};
/**
 * 应收账单明细合计
 */
export const getBillTotalCountApi = (params) => {
	return request({
		url: `${baseURL}/billTotalCount`,
    method: 'post',
    data: params
	})
};
/**
 * 应收账单明细项目级合计
 */
export const getContractsTotalCountApi = (params) => {
	return request({
		url: `${baseURL}/contractsTotalCount`,
    method: 'post',
    data: params
	})
};
/**
 * 应收明细项目级导出
 */
export const getContractsExportApi = (params) => {
	return request({
		url: `${baseURL}/contractsExport`,
    method: 'post',
		data: params,
		responseType: 'blob',
	})
};
/**
 * 应收账单明细导出
 */
export const getBillExportApi = (params) => {
	return request({
		url: `${baseURL}/billExport`,
    method: 'post',
		data: params,
		responseType: 'blob',
	})
};
/**
 * 品牌下拉
 */
export const getBrandNameDropdownApi = (params) => {
	return request({
		url: `${baseURL}/brandNameDropdown`,
    method: 'get',
    params
	})
};
/**
 * 单元编号下拉
 */
export const getConShopCodeDropdownApi = (params) => {
	return request({
		url: `${baseURL}/conShopCodeDropdown`,
    method: 'get',
    params
	})
};
/**
 * 合同编号下拉
 */
export const getContractsCodeDropdownApi = (params) => {
	return request({
		url: `${baseURL}/contractsCodeDropdown`,
    method: 'get',
    params
	})
};
/**
 * 账单编号下拉
 */
export const getInvoiceCodeDropdownApi = (params) => {
	return request({
		url: `${baseURL}/invoiceCodeDropdown`,
    method: 'get',
    params
	})
};

/**
 * 下拉选集合
 */
export const getDropDownListApi = (params) => {
	return request({
		url: `/portal-server/v1/api/arrearsStatistics/dropDownList`,
    method: 'get',
    params
	})
};
/**
 * 品牌 联想查询
 */
export const getBrandNameByNameDropdownApi = (data) => {
	return request({
		url: `/portal-server/v1/api/arrearsStatistics/brandNameDropdown`,
		method: 'post',
		data
	})
};